Class InternalAdjudicator

java.lang.Object
ddejonge.bandana.internalAdjudicator.InternalAdjudicator

public class InternalAdjudicator
extends java.lang.Object
This adjudicator is optimized for use inside an agent, so that the agent can predict the outcome of a set of orders. It skips basic tests such as the legality of moves, to increase speed.
Only works for standard maps. Use as follows:
  1. create an instance of the SimpleAdjudicator.
  2. call the resolve() method with a list of orders and a Game object.
  3. call the getResult() method with any of the orders to see if the order has failed or succeeded.
  4. repeat steps 2 and 3 as much as you like with new Game objects and new orders.
Author:
Dave de Jonge
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  InternalAdjudicator.Orderstatus  
  • Constructor Summary

    Constructors 
    Constructor Description
    InternalAdjudicator()  
  • Method Summary

    Modifier and Type Method Description
    void clear()
    Resets all fields of the Adjudicator.
    boolean getResult​(es.csic.iiia.fabregues.dip.orders.Order order)
    Returns whether this order fails or not.
    void resolve​(es.csic.iiia.fabregues.dip.board.Game _game, java.util.List<es.csic.iiia.fabregues.dip.orders.Order> _orders)
    Checks which orders succeed and which fail and stores the result.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • clear

      public void clear()
      Resets all fields of the Adjudicator.
    • resolve

      public void resolve​(es.csic.iiia.fabregues.dip.board.Game _game, java.util.List<es.csic.iiia.fabregues.dip.orders.Order> _orders)
      Checks which orders succeed and which fail and stores the result.
      Parameters:
      _orders -
      _game -
    • getResult

      public boolean getResult​(es.csic.iiia.fabregues.dip.orders.Order order)
      Returns whether this order fails or not. Should be called after resolve!
      Parameters:
      order -
      Returns: